Unit testing tests whether units of source code, usage procedures, operating procedures, and sets of computer program module(s) together with associated control data work correctly. Unit testing in object-oriented programming tests whether or not a class is fit for use. A known technique for unit testing an ENTERPRISE JAVABEANS® (EJB®) bean is performed on an EJB® container of a WEBSPHERE® Application Server by using features provided by EJB® architecture, such as annotation and runtime injection, and is referred to herein as an in-container testing mode. Each time source code is changed during testing, the aforementioned application server needs to reboot or redeploy. The in-container testing mode is provided in the Apache Cactus test framework for unit testing developed by the Apache Software Foundation. Alternatively, known unit testing of an EJB® bean uses a JUnit testing mode, whereby a unit test case cannot be reused in the in-container testing mode. The JUnit testing mode employs pure JUnit testing in a JUnit testing framework, which is a unit testing framework for the JAVA® programming language.
An EJB® bean is a software component of the EJB® architecture, which is a server-side component architecture for modular construction of enterprise applications offered by Oracle Corporation located in Redwood Shores, Calif. WEBSPHERE® Application Server is an application server offered by International Business Machines Corporation located in Armonk, N.Y. ENTERPRISE JAVABEANS, EJB and JAVA are registered trademarks of Oracle Corporation. WEBSPHERE is a registered trademark of International Business Machines Corporation.